{include file='yxworker/w_head'}
<style type="text/css">
    .warp_img{
    border-radius: 1rem;
    overflow: hidden;
    margin: 0 0 0 10px;
  }
  .o_items .item {
    height: {$itemheight}rem;
    padding: 0.3rem;
    position: relative;
    }

</style>
    <header class="s_header ui-flex">
        <div class="sao">
            <img src="{$_G['URL']['WORKER_CSS']}images/home_03.png">
        </div>
        <div class="s_search ui-flex">
            <img src="{$_G['URL']['WORKER_CSS']}images/home_10.png">
            <input type="text" placeholder="请输入">
        </div>
        <a href="#">
            <img src="{$_G['URL']['WORKER_CSS']}images/home_05.png">
        </a>
        <a href="#">
            <img src="{$_G['URL']['WORKER_CSS']}images/home_07.png">
        </a>
    </header>

    <div class="index_content">

        <div class="s_items s_bg">
            <div class="s_title">
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                {if $myworker['level'] != '3'}
                    <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>"all"));}">
                    {php echo $op=='all'?'【':'';}全部定单{php echo $op=='all'?'】':'';}</a>
                {/if}
                {if $myworker['level'] == '1' && $system['ruanjian']==3}
                    <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>"company"));}"> 
                    {php echo $op=='company'?'【':'';}本公司的定单{php echo $op=='company'?'】':'';}</a>
                {/if}
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>"my"));}">
                {php echo $op=='my'?'【':'';}我的定单{php echo $op=='my'?'】':'';}</a>
            </div>
        </div>
        <div class="o_tabs ui-flex ui-cont-sa" id="o_tabs">
            <div class="tab {php echo $scan==0?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>0));}">
                    <span>全部定单</span>【<font>{$gsumall}</font>】
                </a>
            </div>
            <div class="tab {php echo $scan==12?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>12));}">
                <span>已付</span>【<font>{$gsum12}</font>】
                </a>
            </div>
            <div class="tab {php echo $scan==13?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>13));}">
                <span>未付</span>【<font>{$gsum13}</font>】
                </a>
            </div>
            <div class="tab {php echo $scan==14?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>14));}">
                <span>已退</span>【<font>{$gsum14}</font>】
                </a>
            </div>
            <div class="tab {php echo $scan==15?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>15));}">
                <span>线下</span>【<font>{$gsum15}</font>】
                </a>
            </div>
        </div>
        <div class="o_tabs ui-flex ui-cont-sa" id="o_tabs">
            <div class="tab {php echo $scan==30?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>30));}">
                <span>{$tuanzhang}</span>【<font>{$gsum0}</font>】
                </a>
            </div>
            <div class="tab {php echo $scan==9?'ac':'';}">
                <a href="{php echo "/".createMobileUrl('w_order',array("themeid"=>$themeid,"op"=>$op,"scan"=>9));}">
                <span>{$danmai}</span>【<font>{$gsum9}</font>】
                </a>
            </div>
        </div>
        
        <div id="o_items">
            <div class="o_items">
            {loop $orders $item}
                <div class="item s_bg">
                    <h4>时间：{php echo date("Y-m-d H:i:s", $item['addtime']);}</h4>
                    <div class="price">
                        <span>￥{$item['fee']}</span>
                    </div>
                    <dl class="ui-flex">
                        <dt class="warp_img" style="width: 1rem;height: 1rem;">
                            <img src="{php echo tomedia($item['avatar']);}">
                        </dt>
                        <dd>
                            <p>姓名：{$item['username']}</p>
                            <p>手机号：{$item['mobile']}</p>
                            <p>微信昵称：{php echo mb_substr($item['nickname'],0,8,'utf-8');}</p>
                            {if !empty($config['address'])}
                            <p>{$config['address']}：{$item['address']}</p>
                            {/if}
                            {if !empty($config['shops'])}
                            <p>{$config['shops']}：{$item['option']}</p>
                            {/if}
                            {if !empty($config['datetime'])}
                            <p>{$config['datetime']}：{$item['datetime']}</p>
                            {/if}
                        </dd>
                    </dl>


                    <div class="ui-flex i_t">
                        <span class="c_red">{if $item['type']==9}{$danmai}{else}{php echo $item['type']==0?$tuanzhang:'团员';}{/if}</span> <span>&nbsp;

                        {if $config['groupprice2']>0 && $item['type']!=9 }
                            {if $item['renshu']==0}
                                {$gruoptips}&nbsp;
                            {else}
                                {$gruoptips2}&nbsp;
                            {/if}
                        {/if}

                        推荐人:{php echo mb_substr($item['tjr'],0,4,'utf-8');}</span>
                        <span class="ui-flex-1"></span>
                        {if $config['iscomm']==1}<div class="btn">红包记录</div>{/if}
                    </div>
                    <div class="ui-flex i_t">
                        <span>
                            
                            {if $item['status'] < 0}
                                {php echo $item['isrefund']==2?'自动退款':'手工退款';}
                            {elseif $item['status'] == 1}
                                已支付
                            {elseif $item['status'] == 0}
                                未支付
                            {elseif $item['status'] == 3}
                                线下定单 
                            {/if}访问{$item['scansum']}次&nbsp;转发{$item['forward']}次
                            <!-- 星星5颗&nbsp;转发0次 &nbsp;浏览0人/0次 --></span>
                        <span class="ui-flex-1"></span>
                        {if $item['status'] == 3 && empty($item['openid'])}
                            <a class="btn" href="{php echo "/".createMobileUrl('w_input',array("themeid"=>$themeid,"op"=>"bangding","recordid"=>$item['id']));}">绑定微信</a>
                        {else}
                            <a class="btn" href="{php echo "/".createMobileUrl('w_example',array("themeid"=>$themeid,"id"=>$item['id']));}">交易凭证</a>
                        {/if}
                    </div>
                </div>
            {/loop}
            </div>
        </div>
        
    </div>
{include file='yxworker/w_foot'}
